<!-- DUMMY SWITCHES -->
<part>
	<name>oil_dilution_l</name>
	<animation>
		<parameter>
			<code>(L:Dummy_Oil_Dilution_L, bool) 50 *</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Left Oil Dilution (INOP)</tooltip_text>	
		<callback_code>
(L:Dummy_Oil_Dilution_L, bool) ! (>L:Dummy_Oil_Dilution_L, bool)
		</callback_code>
	</mouserect>
</part>

<part>
	<name>oil_dilution_r</name>
	<animation>
		<parameter>
			<code>(L:Dummy_Oil_Dilution_R, bool) 50 *</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Right Oil Dilution (INOP)</tooltip_text>	
		<callback_code>
(L:Dummy_Oil_Dilution_R, bool) ! (>L:Dummy_Oil_Dilution_R, bool)
		</callback_code>
	</mouserect>
</part>

<part>
	<name>inverter</name>
	<animation>
		<parameter>
			<code>(L:Dummy_Inverter, bool) 50 *</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Inverter (INOP)</tooltip_text>	
		<callback_code>
(L:Dummy_Inverter, bool) ! (>L:Dummy_Inverter, bool)
		</callback_code>
	</mouserect>
</part>

<part>
	<name>inverter_l</name>
	<animation>
		<parameter>
			<code>(L:Dummy_Inverter_L, bool) 50 *</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Left Inverter (INOP)</tooltip_text>	
		<callback_code>
(L:Dummy_Inverter_L, bool) ! (>L:Dummy_Inverter_L, bool)
		</callback_code>
	</mouserect>
</part>

<part>
	<name>inverter_r</name>
	<animation>
		<parameter>
			<code>(L:Dummy_Inverter_R, bool) 50 *</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Right Inverter (INOP)</tooltip_text>	
		<callback_code>
(L:Dummy_Inverter_R, bool) ! (>L:Dummy_Inverter_R, bool)
		</callback_code>
	</mouserect>
</part>

<part>
	<name>signal_sw</name>
	<animation>
		<parameter>
			<code>(L:Dummy_Signal, bool) 50 *</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Right Inverter (INOP)</tooltip_text>	
		<callback_code>
(L:Dummy_Signal, bool) ! (>L:Dummy_Signal, bool)
		</callback_code>
	</mouserect>
</part>

<part>
	<name>signal_alarm</name>
	<animation>
		<parameter>
			<code>(L:Dummy_alarm, bool) 50 *</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Dummy_alarm (INOP)</tooltip_text>	
		<callback_code>
(L:Dummy_alarm, bool) ! (>L:Dummy_alarm, bool)
		</callback_code>
	</mouserect>
</part>


<!-- DUMMY LOW HIGH BLOWER LEVERS -->
<part>
    <name>lever_blower0</name>
    <animation>
        <parameter>
	<code>(L:Dummy_Blowers_L, bool) 50 *</code>
	<lag>400</lag>
        </parameter>
    </animation>
    <mouserect>
        <cursor>Hand</cursor>
	<tooltip_text>eng1 blower</tooltip_text>
    </mouserect>
</part>

<part>
    <name>lever_blower1</name>
    <animation>
        <parameter>
	<code>(L:Dummy_Blowers_R, bool) 50 *</code>
	<lag>400</lag>
        </parameter>
    </animation>
    <mouserect>
        <cursor>Hand</cursor>
	<tooltip_text>eng2 blower</tooltip_text>
    </mouserect>
</part>

<!-- OIL COOLER FLAPS BASED ON COWL FLAPS -->

<part>
	<name>lever_oil_flaps0</name>
	<animation>
		<parameter>
			<code>(L:Dummy_Oilcoolers_L, bool) 50 *</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<tooltip_text>eng1 oil cooler flap (INOP)</tooltip_text>
	</mouserect>
</part>

<part>
	<name>lever_oil_flaps1</name>
	<animation>
		<parameter>
			<code>(L:Dummy_Oilcoolers_R, bool) 50 *</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<tooltip_text>eng2 oil cooler flap (INOP)</tooltip_text>
	</mouserect>
</part>

<!-- A-20 HAVOC Custom Code -->

<!-- INERTIA SWITCH -->
<!-- 50 Frames, 0 = Up, 25 = Mid, 50 = Down --> 
<part>
	<name>inertia_switch</name>
	<animation>
		<parameter>
			<code>
(L:Sw_Inertia, number) 1 == if{ 0 } els{ (L:Sw_Inertia, number) -1 == if{ 50 } els{ 25 } }
			</code>			
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Inertia - Left Click = Left On/Off, Right Click = Right On/Off</tooltip_text>
		<mouse_flags>LeftSingle+RightSingle</mouse_flags>
		<callback_code>
(M:Event) 'LeftSingle' scmp 0 == if{ (L:Sw_Inertia, number) 0 == if{ 1 (>L:Sw_Inertia, number) } els{ 0 (>L:Sw_Inertia, number) } } 
(M:Event) 'RightSingle' scmp 0 == if{ (L:Sw_Inertia, number) 0 == if{ -1 (>L:Sw_Inertia, number) } els{ 0 (>L:Sw_Inertia, number) } } 
		</callback_code>
	</mouserect>
</part>

<!-- MESH SWITCH -->
<!-- 50 Frames, 0 = Up, 25 = Mid, 50 = Down --> 
<part>
	<name>mesh_switch</name>
	<animation>
		<parameter>
			<code>
(L:Sw_Starter, number) 1 == if{ 0 } els{ (L:Sw_Starter, number) -1 == if{ 50 } els{ 25 } }
			</code>			
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Inertia Mesh - Left Click = Left On/Off, Right Click = Right On/Off</tooltip_text>
		<mouse_flags>LeftSingle+RightSingle</mouse_flags>
		<callback_code>
(M:Event) 'LeftSingle' scmp 0 == if{ (L:Sw_Starter, number) 0 == if{ 1 (>L:Sw_Starter, number) } els{ 0 (>L:Sw_Starter, number) } } 
(M:Event) 'RightSingle' scmp 0 == if{ (L:Sw_Starter, number) 0 == if{ -1 (>L:Sw_Starter, number) } els{ 0 (>L:Sw_Starter, number) } } 
		</callback_code>
	</mouserect>
</part>

<!-- MASTER CONTACTOR SWITCH / BATTERY -->
<!-- 50 Frames, 0 = Up, 50 = Down --> 
<part>
	<name>master_contactor</name>
	<animation>
		<parameter>
			<code>
				(L:master_contactor, bool) if{ 50 } els{ 0 }
			</code>			
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Master Battery Contactor</tooltip_text>
		<mouse_flags>LeftSingle</mouse_flags>
		<callback_code>
			(L:master_contactor, bool) ! (>L:master_contactor, bool)
		</callback_code>
	</mouserect>
</part>

<!-- HAVOC LEFT FUEL VALVE -->
<!-- 75 Frames, 0 =off/down, 25 = main/right, 50 = belly/up, 75 = aux/left --> 
<part>
	<name>havoc_left_fuel_valve</name>
	<animation>
		<parameter>
			<code>(L:A20_L_FUEL, number) 25 *</code>
			<lag>100</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>%Left engine feed by - %((L:A20_X_R2L, bool))%{if}%('( X feed )')%!s!%{else}%( '( left aux tank )'  '( belly tank )'  '( left main tank )'  '( nothing )' 4 (L:A20_L_FUEL, number) case)%!s!%{end}%</tooltip_text>
		<mouse_flags>LeftSingle+RightSingle+WheelUp+WheelDown</mouse_flags>
		<callback_code>
 (M:Event) 'WheelUp' scmp 0 == (M:Event) 'WheelDown' scmp 0 == || if{ 0 }
 (M:Event) 'LeftSingle' scmp 0 == if{ (L:A20_L_FUEL, number) ++ d 4 % (>L:A20_L_FUEL, number) } 
 (M:Event) 'RightSingle' scmp 0 == if{ (L:A20_L_FUEL, number) -- s1 -1 == if{ 3 } els{ l1 }  (>L:A20_L_FUEL, number) } 
		</callback_code>
	</mouserect>
</part>

<!-- HAVOC RIGHT FUEL VALVE -->
<!-- 75 Frames, 0 =off/down, 25 = main/right, 50 = bomb bay/up, 75 = aux/left --> 
<part>
	<name>havoc_right_fuel_valve</name>
	<animation>
		<parameter>
			<code>(L:A20_R_FUEL, number) 25 *</code>
			<lag>100</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>%Right engine feed by - %((L:A20_X_L2R, bool))%{if}%('( X feed )')%!s!%{else}%( '( right aux tank )'  '( bomb bay tanks )'  '( right main tank )'  '( nothing )' 4 (L:A20_R_FUEL, number) case)%!s!%{end}%</tooltip_text>
		<mouse_flags>LeftSingle+RightSingle+WheelUp+WheelDown</mouse_flags>
		<callback_code>
(M:Event) 'WheelUp' scmp 0 == (M:Event) 'WheelDown' scmp 0 == || if{ 0 } 
(M:Event) 'LeftSingle' scmp 0 == if{ (L:A20_R_FUEL, number) ++ d 4 % (>L:A20_R_FUEL, number) } 
(M:Event) 'RightSingle' scmp 0 == if{ (L:A20_R_FUEL, number) -- s1 -1 == if{ 3 } els{ l1 }  (>L:A20_R_FUEL, number) } 
		</callback_code>
	</mouserect>
</part>

<!-- HAVOC LEFT CROSSFEED -->
<!-- 50 Frames, 0 = Off/Left, 50 = On/Right --> 
<part>
	<name>havoc_left_crossfeed</name>
	<animation>
		<parameter>
			<code>(L:A20_X_R2L, bool) if{ 50 } els{ 0 }</code>
			<lag>100</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>%X Feed is %((L:A20_X_R2L, bool) !)%{if}%( '( off )' )%!s!%{else}%supplied by - %( '( right aux tank )'  '( bomb bay tanks )'  '( right main tank )'  '( nothing )' 4 (L:A20_R_FUEL, number) case)%!s!%{end}%</tooltip_text>
		<mouse_flags>LeftSingle</mouse_flags>
		<callback_code>
(L:A20_X_R2L, bool) ! (>L:A20_X_R2L, bool)
		</callback_code>
	</mouserect>
</part>

<!-- HAVOC RIGHT CROSSFEED -->
<!-- 50 Frames, 0 = Off/Left, 50 = On/Right --> 
<part>
	<name>havoc_right_crossfeed</name>
	<animation>
		<parameter>
			<code>(L:A20_X_L2R, bool) if{ 50 } els{ 0 }</code>
			<lag>100</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>%X Feed is %((L:A20_X_L2R, bool) !)%{if}%( '( off )' )%!s!%{else}%supplied by - %( '( left aux tank )'  '( belly tank )'  '( left main tank )'  '( nothing )' 4 (L:A20_L_FUEL, number) case)%!s!%{end}%</tooltip_text>
		<mouse_flags>LeftSingle</mouse_flags>
		<callback_code>
(L:A20_X_L2R, bool) ! (>L:A20_X_L2R, bool)
		</callback_code>
	</mouserect>
</part>



 <!-- bombay lever, exit 2 -->
<!-- 50 frames  0 = closed, 25 = in transit, 50 = open -->
<part>
	<name>bombay_lever</name>
	<animation>
		<parameter>
			<code>
				(A:EXIT OPEN:1, percent) 0 == if{ 0 } els{ (A:EXIT OPEN:1, percent) 100 == if{ 50 } els{  25 } }  
			</code>			
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>"Bomb Bay Doors"</tooltip_text>
		<mouse_flags>LeftSingle</mouse_flags>
		<callback_code>
			(A:EXIT OPEN:1, percent) 1 99 rng ! if{ (>K:TOGGLE_AIRCRAFT_EXIT) (&gt;K:SELECT_2) }
		</callback_code>
	</mouserect>
</part>

<!-- 50 keyframes -->
<part>
    <name>master_contactor</name>
        <animation>
            <parameter>
                <code>
        (L:master_contactor, bool) if{ 50 } els{ 0 } 
                </code>
            <lag>400</lag>
            </parameter>
        </animation>
    <mouserect>
    <cursor>Hand</cursor>
   <!-- <tooltip_text>Battery Relay (Close/Open)</tooltip_text> COMMENTED OUT FOR FSX COMPATIBILITY -->
         <callback_code>(L:master_contactor, bool) ! (>L:master_contactor, bool)</callback_code>
    </mouserect>
</part>


<!-- Insert Yoke Code Here -->
<part>
<name>yoke_vis</name>
 <visible_in_range>
	<parameter>
		<code>
			(L:Yoke_Vis, bool) 0 ==
		</code>
	</parameter>
   <minvalue>1</minvalue>
 </visible_in_range>
</part>

<part>
<name>Yoke_Hiding_Control</name>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Hide Yokes</tooltip_text>
		<mouse_flags>LeftSingle</mouse_flags>
	<callback_code>
		(L:Yoke_Vis, bool) ! (L:Yoke_Vis, bool)
	</callback_code>
	</mouserect>
</part>

<!-- Visibility Taxi Light Code  -->
<part>
<name>vis_taxi_light</name>
 <visible_in_range>
	<parameter>
        		<code>
   		(A:LIGHT TAXI,bool) 1 ==
       	 	</code>
	</parameter>
   <minvalue>1</minvalue>
 </visible_in_range>
</part>

<!-- BB Doors Conditional Animation -->
<part>
<Name>door_cargo_BB_left</Name>
    <animation>
        <Parameter>
            <code>
(L:vis_bbexcl, number) 2 == (L:vis_bbexcl, number) 1 == || if{ 0 } els{ (A:EXIT OPEN:1, percent) }
            </code> 
        </Parameter>
    </animation>
</part>

<part>
<Name>door_cargo_BB_right</Name>
    <animation>
        <Parameter>
            <code>
(L:vis_bbexcl, number) 2 == (L:vis_bbexcl, number) 1 == || if{ 0 } els{ (A:EXIT OPEN:1, percent) }
            </code> 
        </Parameter>
    </animation>
</part>

<part>
<Name>door_cargo_BBopen_10</Name>
    <animation>
        <Parameter>
            <code>
(L:vis_bbexcl, number) 2 == (L:vis_bbexcl, number) 1 == || if{ 0 } els{ (A:EXIT OPEN:1, percent) }
            </code> 
        </Parameter>
    </animation>
</part>

<part>
<Name>door_cargo_BBopen_15</Name>
    <animation>
        <Parameter>
            <code>
(L:vis_bbexcl, number) 2 == (L:vis_bbexcl, number) 1 == || if{ 0 } els{ (A:EXIT OPEN:1, percent) }
            </code> 
        </Parameter>
    </animation>
</part>

<!-- Curtains Animation -->
<part>
	<name>havoc_curtain</name>
	<animation>
		<parameter>
			<code>
				(L:Havoc_Curtain, number) 100 - abs
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>"Canopy Curtain"</tooltip_text>
		<mouse_flags>LeftSingle+LeftDrag+Wheel</mouse_flags>
		<callback_code>
			(M:Y) 0 max 100 min (&gt;L:Havoc_Curtain, number)
		</callback_code>
	</mouserect>
</part>

<part>
    <name>groundflaps</name>
    <animation>
        <parameter>
            <code>
                (A:FOLDING WING LEFT PERCENT, percent)
            </code>            
        </parameter>
    </animation>
    <mouserect>
        <cursor>Hand</cursor>
        <tooltip_text>"CAUTION - Ground Only Flaps"</tooltip_text>
        <mouse_flags>LeftSingle</mouse_flags>
        <callback_code>
            (&gt;K:TOGGLE_WING_FOLD)
        </callback_code>
    </mouserect>
</part>


<!-- OPTIONAL, PILOT CONTROLLED BY MASTER BATTERY SWITCH, NOT BATTERY ITSELF (ALL) SEE SPREADSHEET-->

<part>
<name>Pilot</name>
  <visible_in_range>
     <parameter>
        <code>
(L:master_contactor, bool) 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- REAR GUNNER  -->
<part>
<name>Pilot_gunner</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_gunner, bool) 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>


<!-- BOMBARDIER (C ONLY) -->
<part>
<name>PILOT_bombardier</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_bombardier, bool) 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- RADAR OPERATOR (A1, A2) -->
<part>
<name>Pilot_radaroperator</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rdropr, bool) 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- NOSE CANNONS (A2 ONLY) -->
<!-- CODE IN LOGIC WILL MAKE THIS EXCLUSIVE VS. CANNON POD --> 
<part>
<name>cannon</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_cannonnose, bool) 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- NOSE MACHINE GUNS (G, A2) -->
<part>
<name>gun_nose</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_mgnose, bool) 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- CHIN MACHINE GUNS (ALL) -->
<part>
<name>chingun_nose</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_mgchin, bool) 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- CHIN MACHINE GUNS Cover Plates (ALL) -->
<part>
<name>chingunplates</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_mgchin, bool) ! 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

 
<!-- TORPEDO (All) -->
<part>
<name>PV2_L_TORP</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_bbexcl, number) 4 == 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>


<!-- ROCKETS (ALL Models) -->
<!-- Mounts ONLY-->
<part>
<name>PV2_1_MOUNT</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock1, number) 0 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<part>
<name>PV2_2_MOUNT</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock2, number) 0 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<part>
<name>PV2_3_MOUNT</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock3, number) 0 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<part>
<name>PV2_4_MOUNT</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock4, number) 0 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<part>
<name>PV2_5_MOUNT</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock5, number) 0 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<part>
<name>PV2_6_MOUNT</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock6, number) 0 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<part>
<name>PV2_7_MOUNT</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock7, number) 0 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<part>
<name>PV2_8_MOUNT</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock8, number) 0 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- ROCKET 1 (L to R) (ALL) -->
<part>
<name>PV2_1_ROCK</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock1, number) 1 &gt;
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- ROCKET 2 (L to R) (ALL) -->
<part>
<name>PV2_2_ROCK</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock2, number) 1 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- ROCKET 3 (L to R) (ALL) -->
<part>
<name>PV2_3_ROCK</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock3, number) 1 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- ROCKET 4 (L to R) (ALL) -->
<part>
<name>PV2_4_ROCK</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock4, number) 1 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- ROCKET 5 (L to R) (ALL) -->
<part>
<name>PV2_5_ROCK</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock5, number) 1 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- ROCKET 6 (L to R) (ALL) -->
<part>
<name>PV2_6_ROCK</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock6, number) 1 &gt;
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- ROCKET 7 (L to R) (ALL) -->
<part>
<name>PV2_7_ROCK</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock7, number) 1 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- ROCKET 8 (L to R) (ALL) -->
<part>
<name>PV2_8_ROCK</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_rock8, number) 1 &gt; 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- MUTUALLY EXCLUSIVE PARTS!! NOTE CODE CHANGE !! -->

<!-- BELLY TANK (ALL) -->
<part>
<name>tanklongrange</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_bbexcl, number) 1 == 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- CANNON POD (ALL) -->
<!-- CODE IN LOGIC WILL MAKE THIS EXCLUSIVE VS. NOSE CANNON IN THE A2 --> 
<part>
<name>cannonpod</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_bbexcl, number) 2 == 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- BOMBS (ALL) -->
<part>
<name>visBomb</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_bbexcl, number) 3 == 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>

<!-- BAY TANKS (ALL) -->
<part>
<name>SOME PART NAME</name>
  <visible_in_range>
     <parameter>
        <code>
(L:vis_bbexcl, number) 5 == 
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
</part>


<part>
    <name>gun_animation_upper</name>
    <animation>
        <parameter>
            <code>
                (L:Gun_Anim_Upper, number)
            </code>
            <lag>50</lag>
        </parameter>
    </animation>
</part>

<part>
    <name>gun_animation_lower</name>
    <animation>
        <parameter>
            <code>
                (L:Gun_Anim_Lower, number)
            </code>
            <lag>50</lag>
        </parameter>
    </animation>
</part>


<part>
    <name>gun_animation_turret</name>
    <animation>
        <parameter>
            <code>
                (L:Gun_Anim_Turret, number)
            </code>
            <lag>50</lag>
        </parameter>
    </animation>
</part>


<!-- custom animations for A-20 Havoc Ends Here -->

<!-- custom animations for Avro Tutor -->

<!-- Auto-Deploy Slats with Lockout -->

<part>
<name>LE_SLATS_LOCK_LOGIC_SW</name>
<animation>
  <parameter>
   <code>
        (L:LE_SLATS_LOCKOUT, bool) ! (A:FLAPS HANDLE INDEX, number) 0 != and if{ (&gt;K:FLAPS_UP) } 
        (L:LE_SLATS_LOCKOUT, bool) (A:PLANE PITCH DEGREES, degrees) -14 &lt; (A:FLAPS HANDLE INDEX, number) 1 != and and if{ (&gt;K:FLAPS_DOWN) } 
        (L:LE_SLATS_LOCKOUT, bool) (A:PLANE PITCH DEGREES, degrees) -14 &lt; ! (A:FLAPS HANDLE INDEX, number) 0 != and and if{ (&gt;K:FLAPS_UP) }
        (L:LE_SLATS_LOCKOUT, bool) if{ 100 } els{ 0 }
   </code>
   <lag>400</lag>
  </parameter>
</animation>
<mouserect>
  <cursor>Hand</cursor>
  <callback_code>
    (L:LE_SLATS_LOCKOUT, bool) ! (>L:LE_SLATS_LOCKOUT, bool)
  </callback_code>
</mouserect>
</part>
 <!-- End of Avro Tutor Custom Animations -->

<!-- Visibility Code for Stairs, Chocks, Supports, Battery off -->
<part>
<name>chalk_vis</name>
 <visible_in_range>
	<parameter>
		<code>(A:ELECTRICAL MASTER BATTERY, bool) 0 == (A:SIM ON GROUND, bool) 1 == (A:BRAKE PARKING POSITION, percent) 50 &gt; (A:SURFACE TYPE, enum) 2 != and and and 
		</code>
	</parameter>
   <minvalue>1</minvalue>
 </visible_in_range>
</part>

<!-- custom animations for Pilot Visibility on Battery -->
<part>
<name>Apilot</name>
 <visible_in_range>
	<parameter>
		<code>
			(A:ELECTRICAL MASTER BATTERY, bool) 0 !=
		</code>
	</parameter>
   <minvalue>1</minvalue>
 </visible_in_range>
</part>

<!-- custom animations for Harpoon Special Effects -->


<!-- Insert Drop Tank Code Here -->

<part>
<name>PV2_L_DROP</name>
 <visible_in_range>
	<parameter>
		<code>
			(L:PV2_L_DROP, bool) 0 !=
		</code>
	</parameter>
   <minvalue>1</minvalue>
 </visible_in_range>
</part>

<part>
<name>PV2_R_DROP</name>
 <visible_in_range>
	<parameter>
		<code>
			(L:PV2_R_DROP, bool) 0 !=
		</code>
	</parameter>
   <minvalue>1</minvalue>
 </visible_in_range>
</part>



<!-- custom animations for Harpoon Ends Here -->


<!-- custom animations for Mallard TP Switches Pairs for Lighting -->

<!-- Generator  1 -->

<part>
<name>vis_sw_genoff0</name>
  <visible_in_range>
     <parameter>
        <code>
   (A:GENERAL ENG GENERATOR SWITCH:1, bool) 0 ==
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
<animation>
  <parameter>
        <code>
   (A:GENERAL ENG GENERATOR SWITCH:1, bool) if{ 50 } els{ 0 } 
        </code>
   <lag>400</lag>
  </parameter>
</animation>
<mouserect>
	<cursor>Hand</cursor>
	  <tooltip_id>TOOLTIPTEXT_ENG1_GENERATOR_SWITCH</tooltip_id>
	  <event_id>TOGGLE_ALTERNATOR1</event_id>
</mouserect>
</part>
 
<part>
<name>vis_sw_genon0</name>
  <visible_in_range>
     <parameter>
        <code>
   (A:GENERAL ENG GENERATOR SWITCH:1, bool) 1 ==
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
<animation>
  <parameter>
        <code>
   (A:GENERAL ENG GENERATOR SWITCH:1, bool) if{ 50 } els{ 0 } 
        </code>
   <lag>400</lag>
  </parameter>
</animation>
<mouserect>
	<cursor>Hand</cursor>
	<tooltip_id>TOOLTIPTEXT_ENG1_GENERATOR_SWITCH</tooltip_id>
	<event_id>TOGGLE_ALTERNATOR1</event_id>
</mouserect>
</part>


<!-- Generator  2 -->

<part>
<name>vis_sw_genoff1</name>
  <visible_in_range>
     <parameter>
        <code>
   (A:GENERAL ENG GENERATOR SWITCH:2, bool) 0 ==
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
<animation>
  <parameter>
        <code>
   (A:GENERAL ENG GENERATOR SWITCH:2, bool) if{ 50 } els{ 0 } 
        </code>
   <lag>400</lag>
  </parameter>
</animation>
<mouserect>
	<cursor>Hand</cursor>
	  <tooltip_id>TOOLTIPTEXT_ENG2_GENERATOR_SWITCH</tooltip_id>
	  <event_id>TOGGLE_ALTERNATOR2</event_id>
</mouserect>
</part>
 
<part>
<name>vis_sw_genon1</name>
  <visible_in_range>
     <parameter>
        <code>
   (A:GENERAL ENG GENERATOR SWITCH:2, bool) 1 ==
        </code>
     </parameter>
      <minvalue>1</minvalue>
  </visible_in_range>
<animation>
  <parameter>
        <code>
   (A:GENERAL ENG GENERATOR SWITCH:2, bool) if{ 50 } els{ 0 } 
        </code>
   <lag>400</lag>
  </parameter>
</animation>
<mouserect>
	<cursor>Hand</cursor>
	  <tooltip_id>TOOLTIPTEXT_ENG2_GENERATOR_SWITCH</tooltip_id>
	  <event_id>TOGGLE_ALTERNATOR2</event_id>
</mouserect>
</part>

<!-- Master Battery -->

<part>
	<name>vis_sw_master_bat_off</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:ELECTRICAL MASTER BATTERY, bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
			   (A:ELECTRICAL MASTER BATTERY, bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_BATTERY_SWITCH</help_id>
		<tooltip_id>TOOLTIPTEXT_BATTERY_SWITCH</tooltip_id>
		<event_id>TOGGLE_MASTER_BATTERY</event_id>
	</mouserect>
</part>

<part>
	<name>vis_sw_master_bat_on</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:ELECTRICAL MASTER BATTERY, bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
			   (A:ELECTRICAL MASTER BATTERY, bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_BATTERY_SWITCH</help_id>
		<tooltip_id>TOOLTIPTEXT_BATTERY_SWITCH</tooltip_id>
		<event_id>TOGGLE_MASTER_BATTERY</event_id>
	</mouserect>
</part>

<!-- Avionics Switch -->

<part>
	<name>vis_Sw_Avionics_MstrOff</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:AVIONICS MASTER SWITCH, bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
			   (A:AVIONICS MASTER SWITCH, bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_AVIONICS_SWITCH</help_id>
		<tooltip_id>TOOLTIPTEXT_AVIONICS_SWITCH</tooltip_id>
		<event_id>TOGGLE_AVIONICS_MASTER</event_id>
	</mouserect>
</part>
<part>
	<name>vis_Sw_Avionics_MstrOn</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:AVIONICS MASTER SWITCH, bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
			   (A:AVIONICS MASTER SWITCH, bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_AVIONICS_SWITCH</help_id>
		<tooltip_id>TOOLTIPTEXT_AVIONICS_SWITCH</tooltip_id>
		<event_id>TOGGLE_AVIONICS_MASTER</event_id>
	</mouserect>
</part>

<!-- GPS NAV Switch -->

<part>
	<name>vis_sw_NAV_GPSoff</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:GPS DRIVES NAV1, bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
			   (A:GPS DRIVES NAV1, bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_NAV_GPS_SWITCH</help_id>
		<tooltip_id>TOOLTIPTEXT_NAV_GPS_SWITCH</tooltip_id>
		<event_id>TOGGLE_GPS_DRIVES_NAV1</event_id>
	</mouserect>
</part>

<part>
	<name>vis_sw_NAV_GPSon</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:GPS DRIVES NAV1, bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
			   (A:GPS DRIVES NAV1, bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_NAV_GPS_SWITCH</help_id>
		<tooltip_id>TOOLTIPTEXT_NAV_GPS_SWITCH</tooltip_id>
		<event_id>TOGGLE_GPS_DRIVES_NAV1</event_id>
	</mouserect>
</part>

<!-- AutoFeather Switch -->

<part>
	<name>vis_switch_autofeatheroff</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:PANEL AUTO FEATHER SWITCH, bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
			   (A:PANEL AUTO FEATHER SWITCH, bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_id>TOOLTIPTEXT_AUTOFEATHER_SWITCH</tooltip_id>
		<event_id>TOGGLE_AUTOFEATHER_ARM</event_id>
	</mouserect>
</part>
<part>
	<name>vis_switch_autofeatheron</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:PANEL AUTO FEATHER SWITCH, bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
			   (A:PANEL AUTO FEATHER SWITCH, bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_id>TOOLTIPTEXT_AUTOFEATHER_SWITCH</tooltip_id>
		<event_id>TOGGLE_AUTOFEATHER_ARM</event_id>
	</mouserect>
</part>

<!-- Starter Switch 0 -->

<part>
    <name>vis_sw_starteroff0</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:GENERAL ENG STARTER:1, bool) 0 == (L:Mallard_Start_Logic_L, number) 0 == and
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
			   (A:GENERAL ENG STARTER:1, bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
    <mouserect>
        <cursor>Hand</cursor>
        <help_id>HELPID_GAUGE_STARTER_SWITCH</help_id>
        <tooltip_id>TOOLTIPTEXT_STARTER_SWITCH</tooltip_id>
        <callback_code>(>K:TOGGLE_STARTER1) 540 (>L:Mallard_Start_Logic_L, number)</callback_code>
    </mouserect>
</part>

<part>
    <name>vis_sw_starteron0</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:GENERAL ENG STARTER:1, bool) (L:Mallard_Start_Logic_L, number) 0 != ||
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
			   (A:GENERAL ENG STARTER:1, bool) (L:Mallard_Start_Logic_L, number) 0 != || if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
    <mouserect>
        <cursor>Hand</cursor>
        <help_id>HELPID_GAUGE_STARTER_SWITCH</help_id>
        <tooltip_id>TOOLTIPTEXT_STARTER_SWITCH</tooltip_id>
        <callback_code>(>K:TOGGLE_STARTER1) 0 (>L:Mallard_Start_Logic_L, number)</callback_code>
    </mouserect>
</part>

<!-- Starter Switch 1 -->

<part>
    <name>vis_sw_starteroff1</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:GENERAL ENG STARTER:2, bool) 0 == (L:Mallard_Start_Logic_R, number) 0 == and
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
			   (A:GENERAL ENG STARTER:2, bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
    <mouserect>
        <cursor>Hand</cursor>
        <help_id>HELPID_GAUGE_STARTER_SWITCH</help_id>
        <tooltip_id>TOOLTIPTEXT_STARTER_SWITCH</tooltip_id>
        <callback_code>(>K:TOGGLE_STARTER2) 540 (>L:Mallard_Start_Logic_R, number)</callback_code>
    </mouserect>
</part>

<part>
    <name>vis_sw_starteron1</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:GENERAL ENG STARTER:2, bool) (L:Mallard_Start_Logic_R, number) 0 != ||
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
			   (A:GENERAL ENG STARTER:2, bool) (L:Mallard_Start_Logic_R, number) 0 != || if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
    <mouserect>
        <cursor>Hand</cursor>
        <help_id>HELPID_GAUGE_STARTER_SWITCH</help_id>
        <tooltip_id>TOOLTIPTEXT_STARTER_SWITCH</tooltip_id>
        <callback_code>(>K:TOGGLE_STARTER2) 0 (>L:Mallard_Start_Logic_R, number)</callback_code>
    </mouserect>
</part>

<!-- Fuel Pump 0 -->

<part>
	<name>vis_sw_fuel_pumpoff0</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:GENERAL ENG FUEL PUMP SWITCH:1,bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:GENERAL ENG FUEL PUMP SWITCH:1,bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_SWITCH_FUEL_PUMP</help_id>
		<tooltip_id>TOOLTIPTEXT_FUEL_PUMP</tooltip_id>
		<event_id>TOGGLE_ELECT_FUEL_PUMP1</event_id>
	</mouserect>
</part>

<part>
	<name>vis_sw_fuel_pumpon0</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:GENERAL ENG FUEL PUMP SWITCH:1,bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:GENERAL ENG FUEL PUMP SWITCH:1,bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_SWITCH_FUEL_PUMP</help_id>
		<tooltip_id>TOOLTIPTEXT_FUEL_PUMP</tooltip_id>
		<event_id>TOGGLE_ELECT_FUEL_PUMP1</event_id>
	</mouserect>
</part>

<!-- Fuel Pump 1 -->

<part>
	<name>vis_sw_fuel_pumpoff1</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:GENERAL ENG FUEL PUMP SWITCH:2,bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:GENERAL ENG FUEL PUMP SWITCH:2,bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_SWITCH_FUEL_PUMP</help_id>
		<tooltip_id>TOOLTIPTEXT_FUEL_PUMP</tooltip_id>
		<event_id>TOGGLE_ELECT_FUEL_PUMP2</event_id>
	</mouserect>
</part>

<part>
	<name>vis_sw_fuel_pumpon1</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:GENERAL ENG FUEL PUMP SWITCH:2,bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:GENERAL ENG FUEL PUMP SWITCH:2,bool) if{ 50 } els{ 0 } 
        			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_SWITCH_FUEL_PUMP</help_id>
		<tooltip_id>TOOLTIPTEXT_FUEL_PUMP</tooltip_id>
		<event_id>TOGGLE_ELECT_FUEL_PUMP2</event_id>
	</mouserect>
</part>


<!-- inertial_seperator -->
 
<part>
<name>vis_sw_inertsepoff</name>
   <visible_in_range>
     <parameter>
          <code>
     (A:ENG ANTI ICE:1,bool) 0 ==
          </code>
      </parameter>
        <minvalue>1</minvalue>
   </visible_in_range>
<animation>
  <parameter>
   <code>
   (A:ENG ANTI ICE:1,bool) if{ 50 } els{ 0 } 
   </code>
   <lag>400</lag>
  </parameter>
</animation>
<mouserect>
  <cursor>Hand</cursor>
  <tooltip_id>TOOLTIPTEXT_INERTIAL_SEPERATOR</tooltip_id>
  <callback_code>(>K:ANTI_ICE_TOGGLE_ENG1) (>K:ANTI_ICE_TOGGLE_ENG2)</callback_code>
</mouserect>
</part>
 
<part>
<name>vis_sw_inertsepon</name>
   <visible_in_range>
     <parameter>
          <code>
     (A:ENG ANTI ICE:1,bool) 1 ==
          </code>
      </parameter>
        <minvalue>1</minvalue>
   </visible_in_range>
<animation>
  <parameter>
   <code> 
   (A:ENG ANTI ICE:1,bool) if{ 50 } els{ 0 } 
   </code>
   <lag>400</lag>
  </parameter>
</animation>
<mouserect>
  <cursor>Hand</cursor>
  <tooltip_id>TOOLTIPTEXT_INERTIAL_SEPERATOR</tooltip_id>
  <callback_code>(>K:ANTI_ICE_TOGGLE_ENG1) (>K:ANTI_ICE_TOGGLE_ENG2)</callback_code>
</mouserect>
</part>




<!-- Pitot Heat Switch -->

<part>
	<name>vis_sw_pitot_heatoff</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:PITOT HEAT,bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:PITOT HEAT,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_PITOT_HEAT_SWITCH</help_id>
		<tooltip_id>TOOLTIPTEXT_PITOT_HEAT_SWITCH</tooltip_id>
		<event_id>PITOT_HEAT_TOGGLE</event_id>
	</mouserect>
</part>

<part>
	<name>vis_sw_pitot_heaton</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:PITOT HEAT,bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:PITOT HEAT,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_PITOT_HEAT_SWITCH</help_id>
		<tooltip_id>TOOLTIPTEXT_PITOT_HEAT_SWITCH</tooltip_id>
		<event_id>PITOT_HEAT_TOGGLE</event_id>
	</mouserect>
</part>

<!-- Anti Ice Structure Switch -->

<part>
	<name>vis_sw_antiice_structoff</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:STRUCTURAL DEICE SWITCH,bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:STRUCTURAL DEICE SWITCH,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_DEICE_SWITCH</help_id>
		<tooltip_id>TOOLTIPTEXT_DEICE_SWITCH</tooltip_id>
		<event_id>TOGGLE_STRUCTURAL_DEICE</event_id>
	</mouserect>
</part>

<part>
	<name>vis_sw_antiice_structon</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:STRUCTURAL DEICE SWITCH,bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:STRUCTURAL DEICE SWITCH,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_DEICE_SWITCH</help_id>
		<tooltip_id>TOOLTIPTEXT_DEICE_SWITCH</tooltip_id>
		<event_id>TOGGLE_STRUCTURAL_DEICE</event_id>
	</mouserect>
</part>

<!-- Prop De-Ice Switch -->

<part>
	<name>vis_sw_antiicepropoff</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:PROP DEICE SWITCH,bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:PROP DEICE SWITCH,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_MOONEY_PROP_DEICE</help_id>
		<tooltip_id>TOOLTIPTEXT_PROP_DEICE_SWITCH</tooltip_id>
		<event_id>TOGGLE_PROPELLER_DEICE</event_id>
	</mouserect>
</part>

<part>
	<name>vis_sw_antiicepropon</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:PROP DEICE SWITCH,bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:PROP DEICE SWITCH,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_MOONEY_PROP_DEICE</help_id>
		<tooltip_id>TOOLTIPTEXT_PROP_DEICE_SWITCH</tooltip_id>
		<event_id>TOGGLE_PROPELLER_DEICE</event_id>
	</mouserect>
</part>


<!-- Cabin Lights Switch -->
<part>
	<name>vis_sw_cabin_lightoff</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:LIGHT CABIN,bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:LIGHT CABIN,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<event_id>TOGGLE_CABIN_LIGHTS</event_id>
	</mouserect>
</part>

<part>
	<name>vis_sw_cabin_lighton</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:LIGHT CABIN,bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:LIGHT CABIN,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<event_id>TOGGLE_CABIN_LIGHTS</event_id>
	</mouserect>
</part>


<!-- Panel Lights Switch -->

<part>
	<name>vis_sw_panel_lightoff</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:LIGHT PANEL,bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:LIGHT PANEL,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_LIGHT_SWITCH_PANEL</help_id>
		<tooltip_id>TOOLTIPTEXT_LIGHT_SWITCH_PANEL</tooltip_id>
		<callback_code>(&gt;K:PANEL_LIGHTS_TOGGLE)</callback_code>
	</mouserect>
</part>

<part>
	<name>vis_sw_panel_lighton</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:LIGHT PANEL,bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:LIGHT PANEL,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_LIGHT_SWITCH_PANEL</help_id>
		<tooltip_id>TOOLTIPTEXT_LIGHT_SWITCH_PANEL</tooltip_id>
		<callback_code>(&gt;K:PANEL_LIGHTS_TOGGLE)</callback_code>
	</mouserect>
</part>

<!-- Recognition Lights Switch -->

<part>
    <name>vis_sw_recog_lightoff</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:LIGHT RECOGNITION,bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:LIGHT RECOGNITION,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_LIGHT_SWITCH_RECOGNITION</help_id>
		<tooltip_id>TOOLTIPTEXT_LIGHT_SWITCH_RECOGNITION</tooltip_id>
		<event_id>TOGGLE_RECOGNITION_LIGHTS</event_id>
	</mouserect>
</part>

<part>
    <name>vis_sw_recog_lighton</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:LIGHT RECOGNITION,bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:LIGHT RECOGNITION,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_LIGHT_SWITCH_RECOGNITION</help_id>
		<tooltip_id>TOOLTIPTEXT_LIGHT_SWITCH_RECOGNITION</tooltip_id>
		<event_id>TOGGLE_RECOGNITION_LIGHTS</event_id>
	</mouserect>
</part>


<!-- Landing Lights Switch -->

<part>
	<name>vis_sw_landing_lightoff</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:LIGHT LANDING,bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:LIGHT LANDING,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_LIGHT_SWITCH_LANDING</help_id>
		<tooltip_id>TOOLTIPTEXT_LIGHT_SWITCH_LANDING</tooltip_id>
		<event_id>LANDING_LIGHTS_TOGGLE</event_id>
	</mouserect>
</part>

<part>
	<name>vis_sw_landing_lighton</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:LIGHT LANDING,bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:LIGHT LANDING,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_LIGHT_SWITCH_LANDING</help_id>
		<tooltip_id>TOOLTIPTEXT_LIGHT_SWITCH_LANDING</tooltip_id>
		<event_id>LANDING_LIGHTS_TOGGLE</event_id>
	</mouserect>
</part>

<!-- Beacon Light Switch -->

<part>
	<name>vis_sw_beacon_lightoff</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:LIGHT BEACON,bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:LIGHT BEACON,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_LIGHT_SWITCH_BEACON</help_id>
		<tooltip_id>TOOLTIPTEXT_LIGHT_SWITCH_BEACON</tooltip_id>
		<event_id>TOGGLE_BEACON_LIGHTS</event_id>
	</mouserect>
</part>

<part>
	<name>vis_sw_beacon_lighton</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:LIGHT BEACON,bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:LIGHT BEACON,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_LIGHT_SWITCH_BEACON</help_id>
		<tooltip_id>TOOLTIPTEXT_LIGHT_SWITCH_BEACON</tooltip_id>
		<event_id>TOGGLE_BEACON_LIGHTS</event_id>
	</mouserect>
</part>

<!-- NAV Light Switch -->

<part>
	<name>vis_sw_nav_lightoff</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:LIGHT NAV,bool) 0 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:LIGHT NAV,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_LIGHT_SWITCH_NAV</help_id>
		<tooltip_id>TOOLTIPTEXT_LIGHT_SWITCH_NAV</tooltip_id>
		<event_id>TOGGLE_NAV_LIGHTS</event_id>
	</mouserect>
</part>

<part>
	<name>vis_sw_nav_lighton</name>
  	<visible_in_range>
    	<parameter>
        		<code>
   		(A:LIGHT NAV,bool) 1 ==
       	 	</code>
    	 </parameter>
     		 <minvalue>1</minvalue>
 	 </visible_in_range>
	<animation>
		<parameter>
			<code>
				(A:LIGHT NAV,bool) if{ 50 } els{ 0 }
			</code>
			<lag>400</lag>
		</parameter>
	</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_LIGHT_SWITCH_NAV</help_id>
		<tooltip_id>TOOLTIPTEXT_LIGHT_SWITCH_NAV</tooltip_id>
		<event_id>TOGGLE_NAV_LIGHTS</event_id>
	</mouserect>
</part>

<!-- TANK ENUMS, 0 = Off, 1 = All, 2 = Left, 3 = Right -->
<!-- LEFT SELECTOR, Keyframes, 0 = OFF, 25 = LEFT TANK, 50 = RIGHT TANK -->

<part>
	<name>lever_fuel_selector_OLR</name>
		<animation>
			<parameter>
				<code>
					2 1 1 0 4 (A:FUEL TANK SELECTOR 1, enum) case 25 *
				</code>
			<lag>100</lag>
			</parameter>
		</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_FUEL_SELECTOR</help_id>
		<tooltip_id>TOOLTIPTEXT_LEFT_FUEL_SELECTOR</tooltip_id>
		<mouse_flags>LeftSingle+LeftDrag+Wheel</mouse_flags>
			<callback_code>
				(M:Event) 'LeftSingle' scmp 0 == if{ (M:X) (&gt;L:Left_Sel_Pos, number) 2 1 1 0 4 (A:FUEL TANK SELECTOR 1, enum) case (&gt;L:Left_Sel_Tnk, number) } els{ (M:X) (L:Left_Sel_Pos, number) - 80 / int (L:Left_Sel_Tnk, number) + 0 max 2 min s0 2 1 1 0 4 (A:FUEL TANK SELECTOR 1, enum) case != if{ l0 0 == if{ (&gt;K:FUEL_SELECTOR_OFF) } l0 1 == if{ (&gt;K:FUEL_SELECTOR_LEFT) } l0 2 == if{ (&gt;K:FUEL_SELECTOR_RIGHT) } } }
			</callback_code>
		</mouserect>
</part>


<!-- RIGHT SELECTOR, Keyframes, 50 = OFF, 25 = RIGHT TANK, 0 = LEFT TANK -->
<part>
	<name>lever_fuel_selector_LRO</name>
		<animation>
			<parameter>
				<code>
					1 0 1 2 4 (A:FUEL TANK SELECTOR:2, enum) case 25 *
				</code>
			<lag>100</lag>
			</parameter>
		</animation>
	<mouserect>
		<cursor>Hand</cursor>
		<help_id>HELPID_GAUGE_FUEL_SELECTOR</help_id>
		<tooltip_id>TOOLTIPTEXT_RIGHT_FUEL_SELECTOR</tooltip_id>
		<mouse_flags>LeftSingle+LeftDrag+Wheel</mouse_flags>
			<callback_code>
				(M:Event) 'LeftSingle' scmp 0 == if{ (M:X) (&gt;L:Right_Sel_Pos, number) 1 0 1 2 4 (A:FUEL TANK SELECTOR 2, enum) case (&gt;L:Right_Sel_Tnk, number) } els{ (M:X) (L:Right_Sel_Pos, number) - 80 / int (L:Right_Sel_Tnk, number) + 0 max 2 min s0 1 0 1 2 4 (A:FUEL TANK SELECTOR 2, enum) case != if{ l0 0 == if{ (&gt;K:FUEL_SELECTOR_2_LEFT) } l0 1 == if{ (&gt;K:FUEL_SELECTOR_2_RIGHT) } l0 2 == if{ (&gt;K:FUEL_SELECTOR_2_OFF) } } }
			</callback_code>
	</mouserect>
</part>

<!-- 100 Keyframes -->
<!-- apply to prop0_still blades -->

<part>
<name>AutoFeathr_PropPitch0</name>
	<animation>
		<parameter>
			<code>
			(L:PROP1_LOGIC, number) 
			</code>
		<lag>100</lag>
		</parameter>
	</animation>
</part>


<!-- apply to prop1_still blades -->

<part>
<name>AutoFeathr_PropPitch1</name>
	<animation>
		<parameter>
			<code>
			(L:PROP2_LOGIC, number) 
			</code>
		<lag>100</lag>
		</parameter>
	</animation>
</part>


<!-- custom animations for Pinto Rear Wheels -->

<Part>
<Name>RIGHT_WHEEL_RPM</Name>

  <animation>
	<rotation>X</rotation>
   <Parameter>
     <Code>
(P:Absolute Time,minutes) (L:PrevTimeRRW,number) - 6.283 * (L:RRW-RPM,number) * 
(L:RRW-POS,number) + rnor d (&gt;L:RRW-POS,number)
(P:Absolute Time,minutes) (&gt;L:PrevTimeRRW,number)

     </Code>
   </Parameter>
  </animation>
</Part>

<Part>
<Name>LEFT_WHEEL_RPM</Name>

  <animation>
	<rotation>X</rotation>
   <Parameter>
     <Code>
(P:Absolute Time,minutes) (L:PrevTimeLRW,number) - 6.283 * (L:LRW-RPM,number) * 
(L:LRW-POS,number) + rnor d (&gt;L:LRW-POS,number)
(P:Absolute Time,minutes) (&gt;L:PrevTimeLRW,number)


     </Code>
   </Parameter>
  </animation>
</Part>

<!-- custom animations for Pinto Front Wheels -->


<Part>
<Name>RF_WHEEL_RPM</Name>

  <animation>
	<rotation>X</rotation>
   <Parameter>
     <Code>
(P:Absolute Time,minutes) (L:PrevTimeRFW,number) - 6.283 * (L:RFW-RPM,number) * 
(L:RFW-POS,number) + rnor d (&gt;L:RFW-POS,number)
(P:Absolute Time,minutes) (&gt;L:PrevTimeRFW,number)


     </Code>
   </Parameter>
  </animation>
</Part>

<Part>
<Name>LF_WHEEL_RPM</Name>

  <animation>
	<rotation>X</rotation>
   <Parameter>
     <Code>
(P:Absolute Time,minutes) (L:PrevTimeLFW,number) - 6.283 * (L:LFW-RPM,number) * 
(L:LFW-POS,number) + rnor d (&gt;L:LFW-POS,number)
(P:Absolute Time,minutes) (&gt;L:PrevTimeLFW,number)



     </Code>
   </Parameter>
  </animation>
</Part>
